$OpenBSD: patch-clamav-unofficial-sigs_sh,v 1.6 2015/12/08 15:21:53 sthen Exp $
--- clamav-unofficial-sigs.sh.orig	Wed Dec  2 10:56:35 2015
+++ clamav-unofficial-sigs.sh	Tue Dec  8 15:20:49 2015
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
 ################################################################################
 # This is property of eXtremeSHOK.com
 # You are free to use, modify and distribute, however you may not remove this notice.
@@ -20,6 +20,9 @@
 ################################################################################
 
 default_config="/etc/clamav-unofficial-sigs.conf"
+pkg_mgr="pkg_add"
+pkg_rm="pkg_delete"
+PATH=$PATH:/usr/local/sbin:/usr/local/bin
 
 ################################################################################
 
@@ -215,6 +218,11 @@ do
 done
 
 #config version validation
+if [ -z "$config_version" ] ; then
+  xshok_pretty_echo_and_log "ERROR: Configuration version not set. Update your configuration based on example file." "="
+  exit 1
+fi
+
 if [ "$config_version" -lt "$minimum_required_config_version" ] ; then
   xshok_pretty_echo_and_log "ERROR: Your configuration version is not compatible with this version" "="
   exit 1
@@ -782,7 +790,7 @@ fi
 
 # Check to see if the working directories have been created.
 # If not, create them.  Otherwise, ignore and proceed with script.
-mkdir -p "$work_dir" "$securiteinfo_dir" "$malwarepatrol_dir" "$linuxmalwaredetect_dir" "$sanesecurity_dir" "$config_dir" "$gpg_dir" "$add_dir"
+mkdir -p "$work_dir" "$securiteinfo_dir" "$malwarepatrol_dir" "$linuxmalwaredetect_dir" "$sanesecurity_dir" "$config_dir" "$gpg_dir" "$add_dir" "$yararules_dir"
 
 # Set secured access permissions to the GPG directory
 chmod 0700 "$gpg_dir"
@@ -1433,7 +1441,7 @@ if [ "$yararules_enabled" == "yes" ] ; then
  if [ "$time_interval" -ge $(($update_interval - 600)) ] ; then
   echo "$current_time" > "$config_dir"/last-yararules-update.txt
 
-  cxshok_pretty_echo_and_log "Yara-Rules Database File Updates" "="
+  xshok_pretty_echo_and_log "Yara-Rules Database File Updates" "="
   xshok_pretty_echo_and_log "Checking for yararules updates..."
   yararules_updates="0"
   for db_file in $yararules_dbs ; do
@@ -3251,7 +3259,7 @@ else
  time_remaining=$(($update_interval - $time_interval))
  hours_left=$(($time_remaining / 3600))
  minutes_left=$(($time_remaining % 3600 / 60))
- xshok_pretty_echo_and_log "$yararules_update_hours hours have not yet elapsed since the last linux malware detect update check"
+ xshok_pretty_echo_and_log "$yararules_update_hours hours have not yet elapsed since the last Yara update check"
  xshok_pretty_echo_and_log "No update check was performed at this time" "-"
  xshok_pretty_echo_and_log "Next check will be performed in approximately $hours_left hour(s), $minutes_left minute(s)"
 fi
